package com.mer.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mer.entity.Course;
import com.mer.mapper.OrderCourseMapper;
import com.mer.service.CourseService;
import com.mer.vo.CommonResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: IIPhase-project
 * @description: 课程订单实现类
 * @author: 张庆恒
 * @create: 2021-10-22 19:50
 **/
@Service
public class CourseServiceImpl extends ServiceImpl<OrderCourseMapper, Course> implements CourseService {

    @Resource
    private OrderCourseMapper orderCourseMapper;

    @Override
    public CommonResult queryCourse(String courseId) {
        List<Course> courses = orderCourseMapper.queryCourseById(courseId);
        return new CommonResult(2000,"查询成功",courses);
    }
}
